package com.cg.controller;

import com.cg.dto.Result;
import com.cg.dto.ResultUtils;
import com.cg.entity.Branch;
import com.cg.service.BranchService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Branch)表控制层
 *
 * @author chengong
 * @since 2024-01-07 12:17:12
 */
@RestController
@RequestMapping("/branch")
public class BranchController {
    /**
     * 服务对象
     */
    @Resource
    private BranchService branchService;

    /**
     * 加载所有院区
     */
    @GetMapping("/queryBranchList")
    public Result<List<Branch>> queryBranchList(){
        return ResultUtils.returnDataSuccess(branchService.queryBranchList());
    }

}

